/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.geomagnetic_sensor_info.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 传感器传送数据信息Entity
 * @author xlp
 * @version 2019-04-11
 */
public class GeomagneticSensorInfo extends DataEntity<GeomagneticSensorInfo> {
	
	private static final long serialVersionUID = 1L;
	private String sensorId;		// 传感器id
	private String sensorInfo;		// 传感器穿过来的数据解析值，如：1~255代表车压程度
	private Date createTime;		// 创建时间（车辆过传感器的时间）
	
	public GeomagneticSensorInfo() {
		super();
	}

	public GeomagneticSensorInfo(String id){
		super(id);
	}

	@Length(min=1, max=64, message="传感器id长度必须介于 1 和 64 之间")
	public String getSensorId() {
		return sensorId;
	}

	public void setSensorId(String sensorId) {
		this.sensorId = sensorId;
	}
	
	@Length(min=0, max=10, message="传感器穿过来的数据解析值，如：1~255代表车压程度长度必须介于 0 和 10 之间")
	public String getSensorInfo() {
		return sensorInfo;
	}

	public void setSensorInfo(String sensorInfo) {
		this.sensorInfo = sensorInfo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}